#include "sampleinfonumberdialog.h"
#include "ui_sampleinfonumberdialog.h"

SampleInfoNumberDialog::SampleInfoNumberDialog(QWidget *parent) :
    QDialog(parent),
    IDialog(),
    ui(new Ui::SampleInfoNumberDialog)
{
    ui->setupUi(this);
    this->setGeometry(this->getCenter(this->geometry().width(),this->geometry().height()));
    sampleInfoDao = new SampleInfoDao();
}

SampleInfoNumberDialog::~SampleInfoNumberDialog()
{
    delete ui;
    delete sampleInfoDao;
}

void SampleInfoNumberDialog::on_Btn_OK_clicked()
{
   setSampleNumber();
   this->accept();
}

void SampleInfoNumberDialog::on_Btn_cancel_2_clicked()
{
    this->reject();
}

void SampleInfoNumberDialog::setSampleNumber()
{
    sampleInfoDao->id = ui->en_lineEdit->text();
}

SampleInfoDao *SampleInfoNumberDialog::getSampleNumber()
{
    return sampleInfoDao;
}
